import Layout from '../views/Layout.vue'
import Home from '../views/home'

const routes = [{
    path: '/',
    name: 'Layout',
    component: Layout,
    meta: {
        isLogin: true,
    },
    /*
     * 首页中的底部导航栏组件作为layout容器的子组件
     */
    children: [{
        path: '/',
        name: 'Home',
        component: Home,
        meta: {
            isLogin: true
        }
    },
    {
        path: '/life',
        name: 'Life',
        component: () => import('../views/life'),
        meta: {
            isLogin: true
        }
    },
    {
        path: '/mine',
        name: 'Mine',
        component: () => import('../views/mine'),
        meta: {
            isLogin: true
        },
    },

    {
        path: '/shop',
        name: 'Shop',
        component: () => import('../views/shop'),
        meta: {
            isLogin: true
        }
    },
    ]
},
{
    path: '/loginDetail',//登录详情
    name: 'LoginDetail',
    component: () => import('../views/login')
},
{
    path: '/login',  //登录
    name: 'Login',
    component: () => import('../views/login/Login')
},
{
    path: '/register', //注册
    name: 'Register',
    component: () => import('../views/login/Register')
},


{
    // 找舍友
    path: '/roommate',
    name: 'Roommate',
    component: () => import('../views/home/roommate/Roommate.vue')
},
/**
 * 生活服务开始
 */
/**
 * 水费
 */
{
    path: "/water",
    name: 'Water',
    component: () => import("../views/life/Serve/Water")
},
/**
 * 电费
 */
{
    path: "/electricity",
    name: 'Electricity',
    component: () => import("../views/life/Serve/Electricity")
},
/**
 * 更多
 */
{
    path: '/more',
    name: 'More',
    component: () => import("../views/life/Serve/More")
},
/**
 * 宽带
 */
{
    path: '/net',
    name: 'Net',
    component: () => import("../views/life/Serve/Net")
},
/**
 * 暖气费
 */
{
    path: '/heating',
    name: "Heating",
    component: () => import("../views/life/Serve/Heating")
},
/**
 * 电视费
 */
{
    path: '/television',
    name: 'Television',
    component: () => import("../views/life/Serve/Television")
},
/**
 * 燃气费
 */
{
    path: '/gas',
    name: 'Gas',
    component: () => import("../views/life/Serve/Gas")
},
/**
 * 保洁
 */
{
    path: '/cleaner',
    name: 'Cleaner',
    component: () => import("../views/life/Serve/Cleaner")
},
/**
 * 家修
 */
{
    path: '/maintain',
    name: 'Maintain',
    component: () => import("../views/life/Serve/Maintain")
},
/**
 * 搬家
 */
{
    path: '/move',
    name: 'Move',
    component: () => import("../views/life/Serve/Move")
},
/**
 * 日常保洁
 */
{
    path: '/everyday',
    name: "Everyday",
    component: () => import("../views/life/Serve/Everyday")
},
/**
 * 除螨保洁
 */
{
    path: "/anti",
    name: 'Anti',
    component: () => import("../views/life/Serve/Anti")
},
/**
 * 充值优惠
 */
{
    path: '/recharge',
    name: "Recharge",
    component: () => import("../views/life/Serve/Recharge")
},
/**
 * 生活服务结束
 */
{
    path: '/city',
    name: 'CityInfo',
    component: () => import('../components/cityInfo/CityInfo.vue')
},
//新品上市
{
    path: '/mynews',
    name: 'MyNews',
    component: () => import('../views/home/myNews/MyNews.vue')
},

/**
 * 商城所有页面路由
 */

{   
    path: '/newProduct', // 新品上市
    name: 'NewProduct',
    component: () => import('../views/shop/NewProduct')
},
{   
    path: '/secondHand', // 二手市场
    name: 'SecondHand',
    component: () => import('../views/shop/SecondHand')
},
{   
    path: '/shopCar', //购物车
    name: 'ShopCar',
    component: () => import('../views/shop/ShopCar')
},
{   
    path: '/bedroom', //卧室
    name: 'Bedroom',
    props:true,
    component: () => import('../views/shop/Bedroom')
},
{   
    path: '/details/:id', //卧室
    name: 'Details',
    props:true,
    component: () => import('../views/shop/Details')
},





/**
 * 我的下面所有页面路由
 */
{
    path: '/ticket', //优惠券
    name: 'Ticket',
    component: () => import('../views/mine/Ticket')
}, {
    path: '/zhimaCredit',  //芝麻信用
    name: 'ZhimaCredit',
    component: () => import('../views/mine/ZhimaCredit')
}, {
    path: '/collect',  //收藏
    name: 'Collect',
    component: () => import('../views/mine/Collection')
}, {
    path: '/orderLook',  //约看
    name: 'OrderLook',
    component: () => import('../views/mine/OrderLook')
}, {     //订单
    path: '/myOrder',
    name: 'MyOrder',
    component: () => import('../views/mine/MyOrder')
}, {     //账单
    path: '/myBill',
    name: 'MyBill',
    component: () => import('../views/mine/MyBill')
}, {
    //退租
    path: '/exitRent',
    name: 'ExitRent',
    component: () => import('../views/mine/ExitRent')
}, {
    //我的合同
    path: '/myContract',
    name: 'MyContract',
    component: () => import('../views/mine/MyContract')
}, {
    //退租
    path: '/relet',
    name: 'Relet',
    component: () => import('../views/mine/Relet')
},
{
    //转租
    path: '/sublet',
    name: 'Sublet',
    component: () => import('../views/mine/Sublet')
},
{
    //评价
    path: '/comment',
    name: 'Comment',
    component: () => import('../views/mine/Comment')
},
{
    path: '/suggest',
    name: 'Suggest',
    component: () => import('../views/mine/Suggest')
}
]

export default routes;